package cn.e2win.biz.comm;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.scheduling.quartz.QuartzJobBean;

import cn.e2win.biz.sys.Dict;
import cn.e2win.biz.sys.SysDictDao;



public class QuartzTask extends QuartzJobBean implements ApplicationContextAware{
	private static ApplicationContext ac = null;
	//private static SpringConfigTool springConfigTool = null;
	 
	
	public void executeAction() {
		// 根据业务需要自己定义,这里只是一个例子		
		SysDictDao dictDao = (SysDictDao) ac.getBean("sysDictDao");
		
		Dict.initDict(dictDao);
	}
	
	
	@Override
	protected void executeInternal(JobExecutionContext arg0) throws JobExecutionException {

	}
	



	@Override
	public void setApplicationContext(ApplicationContext ac) throws BeansException {
		this.ac = ac;
		
	}

}

